#ifndef __W25Q32_H
#define __W25Q32_H

#include "bsp_spi.h"




void W25Q32_CS(uint8_t enable);
uint8_t W25Q32_SendReadByte ( uint8_t send_byte );
uint8_t W25Q32_SendBuffer(uint8_t *buf,uint8_t size);
uint8_t W25Q32_RecvBuffer(uint8_t *buf,uint8_t size);

void W25Q32_Init ( void );
uint8_t W25Q32_Write( uint32_t address, uint8_t* buffer,  uint32_t length );
uint8_t W25Q32_Read ( uint32_t address, uint8_t* buffer,  uint32_t length );
uint8_t W25Q32_SectorErase ( uint32_t address, uint8_t state );
uint8_t W25Q32_ChipErase ( uint8_t state );
uint8_t W25Q32_32KBlockErase ( uint32_t address, uint8_t state );
uint8_t W25Q32_64KBlockErase ( uint32_t address, uint8_t state );
uint8_t W25Q32_ReadStatus(void);
#endif

